
#include <SDL/SDL.h>

// for i in `grep '#define SDL_.*0x' -r SDL_video.h  | sed 's/\s/\n/g' | grep SDL_ | sed s/SDL_//` ; do echo -e "\t\$$i = SDL_$i,"  ; done

typedef SDL_Surface $Surface;
typedef SDL_PixelFormat $PixelFormat;
typedef SDL_Rect $Rect;
typedef SDL_Color $Color;
typedef SDL_Palette $Palette;
typedef SDL_VideoInfo $VideoInfo;
typedef SDL_Overlay $Overlay;

typedef SDL_ActiveEvent $ActiveEvent;
typedef SDL_KeyboardEvent $KeyboardEvent;
typedef SDL_MouseMotionEvent $MouseMotionEvent;
typedef SDL_MouseButtonEvent $MouseButtonEvent;
typedef SDL_JoyAxisEvent $JoyAxisEvent;
typedef SDL_JoyBallEvent $JoyBallEvent;
typedef SDL_JoyHatEvent $JoyHatEvent;
typedef SDL_JoyButtonEvent $JoyButtonEvent;
typedef SDL_ResizeEvent $ResizeEvent;
typedef SDL_ExposeEvent $ExposeEvent;
typedef SDL_QuitEvent $QuitEvent;
typedef SDL_UserEvent $UserEvent;
typedef SDL_SysWMmsg $SysWMmsg;
typedef SDL_SysWMEvent $SysWMEvent;
typedef SDL_Event $Event;
typedef SDL_keysym $Keysym;

enum
{

// init flags

	$INIT_AUDIO = SDL_INIT_AUDIO,
	$INIT_VIDEO = SDL_INIT_VIDEO,
	$INIT_CDROM = SDL_INIT_CDROM,
	$INIT_TIMER = SDL_INIT_TIMER,
	$INIT_JOYSTICK = SDL_INIT_JOYSTICK,
	$INIT_NOPARACHUTE = SDL_INIT_NOPARACHUTE,
	$INIT_EVENTTHREAD = SDL_INIT_EVENTTHREAD,
	$INIT_EVERYTHING = SDL_INIT_EVERYTHING,

// setvideo flags

	$SWSURFACE = SDL_SWSURFACE,
	$HWSURFACE = SDL_HWSURFACE,
	$ASYNCBLIT = SDL_ASYNCBLIT,
	$ANYFORMAT = SDL_ANYFORMAT,
	$HWPALETTE = SDL_HWPALETTE,
	$DOUBLEBUF = SDL_DOUBLEBUF,
	$FULLSCREEN = SDL_FULLSCREEN,
	$OPENGL = SDL_OPENGL,
	$OPENGLBLIT = SDL_OPENGLBLIT,
	$RESIZABLE = SDL_RESIZABLE,
	$NOFRAME = SDL_NOFRAME,
	$HWACCEL = SDL_HWACCEL,
	$SRCCOLORKEY = SDL_SRCCOLORKEY,
	$RLEACCELOK = SDL_RLEACCELOK,
	$RLEACCEL = SDL_RLEACCEL,
	$SRCALPHA = SDL_SRCALPHA,
	$PREALLOC = SDL_PREALLOC,
	$YV12_OVERLAY = SDL_YV12_OVERLAY,
	$IYUV_OVERLAY = SDL_IYUV_OVERLAY,
	$YUY2_OVERLAY = SDL_YUY2_OVERLAY,
	$UYVY_OVERLAY = SDL_UYVY_OVERLAY,
	$YVYU_OVERLAY = SDL_YVYU_OVERLAY,
	$LOGPAL = SDL_LOGPAL,
	$PHYSPAL = SDL_PHYSPAL,

// event types

	$NOEVENT = SDL_NOEVENT,
	$ACTIVEEVENT = SDL_ACTIVEEVENT,
	$KEYDOWN = SDL_KEYDOWN,
	$KEYUP = SDL_KEYUP,
	$MOUSEMOTION = SDL_MOUSEMOTION,
	$MOUSEBUTTONDOWN = SDL_MOUSEBUTTONDOWN,
	$MOUSEBUTTONUP = SDL_MOUSEBUTTONUP,
	$JOYAXISMOTION = SDL_JOYAXISMOTION,
	$JOYBALLMOTION = SDL_JOYBALLMOTION,
	$JOYHATMOTION = SDL_JOYHATMOTION,
	$JOYBUTTONDOWN = SDL_JOYBUTTONDOWN,
	$JOYBUTTONUP = SDL_JOYBUTTONUP,
	$QUIT = SDL_QUIT,
	$SYSWMEVENT = SDL_SYSWMEVENT,
	$EVENT_RESERVEDA = SDL_EVENT_RESERVEDA,
	$EVENT_RESERVEDB = SDL_EVENT_RESERVEDB,
	$VIDEORESIZE = SDL_VIDEORESIZE,
	$VIDEOEXPOSE = SDL_VIDEOEXPOSE,
	$EVENT_RESERVED2 = SDL_EVENT_RESERVED2,
	$EVENT_RESERVED3 = SDL_EVENT_RESERVED3,
	$EVENT_RESERVED4 = SDL_EVENT_RESERVED4,
	$EVENT_RESERVED5 = SDL_EVENT_RESERVED5,
	$EVENT_RESERVED6 = SDL_EVENT_RESERVED6,
	$EVENT_RESERVED7 = SDL_EVENT_RESERVED7,

	$USEREVENT = SDL_USEREVENT,

	$NUMEVENTS = SDL_NUMEVENTS,

// event masks

	$ACTIVEEVENTMASK = SDL_ACTIVEEVENTMASK,
	$KEYDOWNMASK = SDL_KEYDOWNMASK,
	$KEYUPMASK = SDL_KEYUPMASK,
	$KEYEVENTMASK = SDL_KEYEVENTMASK,
	$MOUSEMOTIONMASK = SDL_MOUSEMOTIONMASK,
	$MOUSEBUTTONDOWNMASK = SDL_MOUSEBUTTONDOWNMASK,
	$MOUSEBUTTONUPMASK = SDL_MOUSEBUTTONUPMASK,
	$MOUSEEVENTMASK = SDL_MOUSEEVENTMASK,
	$JOYAXISMOTIONMASK = SDL_JOYAXISMOTIONMASK,
	$JOYBALLMOTIONMASK = SDL_JOYBALLMOTIONMASK,
	$JOYHATMOTIONMASK = SDL_JOYHATMOTIONMASK,
	$JOYBUTTONDOWNMASK = SDL_JOYBUTTONDOWNMASK,
	$JOYBUTTONUPMASK = SDL_JOYBUTTONUPMASK,
	$JOYEVENTMASK = SDL_JOYEVENTMASK,
	$VIDEORESIZEMASK = SDL_VIDEORESIZEMASK,
	$VIDEOEXPOSEMASK = SDL_VIDEOEXPOSEMASK,
	$QUITMASK = SDL_QUITMASK,
	$SYSWMEVENTMASK = SDL_SYSWMEVENTMASK,

// keys
    $K_UNKNOWN = SDLK_UNKNOWN,
    $K_FIRST = SDLK_FIRST,
    $K_BACKSPACE = SDLK_BACKSPACE,
    $K_TAB = SDLK_TAB,
    $K_CLEAR = SDLK_CLEAR,
    $K_RETURN = SDLK_RETURN,
    $K_PAUSE = SDLK_PAUSE,
    $K_ESCAPE = SDLK_ESCAPE,
    $K_SPACE = SDLK_SPACE,
    $K_EXCLAIM = SDLK_EXCLAIM,
    $K_QUOTEDBL = SDLK_QUOTEDBL,
    $K_HASH = SDLK_HASH,
    $K_DOLLAR = SDLK_DOLLAR,
    $K_AMPERSAND = SDLK_AMPERSAND,
    $K_QUOTE = SDLK_QUOTE,
    $K_LEFTPAREN = SDLK_LEFTPAREN,
    $K_RIGHTPAREN = SDLK_RIGHTPAREN,
    $K_ASTERISK = SDLK_ASTERISK,
    $K_PLUS = SDLK_PLUS,
    $K_COMMA = SDLK_COMMA,
    $K_MINUS = SDLK_MINUS,
    $K_PERIOD = SDLK_PERIOD,
    $K_SLASH = SDLK_SLASH,
    $K_0 = SDLK_0,
    $K_1 = SDLK_1,
    $K_2 = SDLK_2,
    $K_3 = SDLK_3,
    $K_4 = SDLK_4,
    $K_5 = SDLK_5,
    $K_6 = SDLK_6,
    $K_7 = SDLK_7,
    $K_8 = SDLK_8,
    $K_9 = SDLK_9,
    $K_COLON = SDLK_COLON,
    $K_SEMICOLON = SDLK_SEMICOLON,
    $K_LESS = SDLK_LESS,
    $K_EQUALS = SDLK_EQUALS,
    $K_GREATER = SDLK_GREATER,
    $K_QUESTION = SDLK_QUESTION,
    $K_AT = SDLK_AT,
    $K_LEFTBRACKET = SDLK_LEFTBRACKET,
    $K_BACKSLASH = SDLK_BACKSLASH,
    $K_RIGHTBRACKET = SDLK_RIGHTBRACKET,
    $K_CARET = SDLK_CARET,
    $K_UNDERSCORE = SDLK_UNDERSCORE,
    $K_BACKQUOTE = SDLK_BACKQUOTE,
    $K_a = SDLK_a,
    $K_b = SDLK_b,
    $K_c = SDLK_c,
    $K_d = SDLK_d,
    $K_e = SDLK_e,
    $K_f = SDLK_f,
    $K_g = SDLK_g,
    $K_h = SDLK_h,
    $K_i = SDLK_i,
    $K_j = SDLK_j,
    $K_k = SDLK_k,
    $K_l = SDLK_l,
    $K_m = SDLK_m,
    $K_n = SDLK_n,
    $K_o = SDLK_o,
    $K_p = SDLK_p,
    $K_q = SDLK_q,
    $K_r = SDLK_r,
    $K_s = SDLK_s,
    $K_t = SDLK_t,
    $K_u = SDLK_u,
    $K_v = SDLK_v,
    $K_w = SDLK_w,
    $K_x = SDLK_x,
    $K_y = SDLK_y,
    $K_z = SDLK_z,
    $K_DELETE = SDLK_DELETE,
    $K_WORLD_0 = SDLK_WORLD_0,
    $K_WORLD_1 = SDLK_WORLD_1,
    $K_WORLD_2 = SDLK_WORLD_2,
    $K_WORLD_3 = SDLK_WORLD_3,
    $K_WORLD_4 = SDLK_WORLD_4,
    $K_WORLD_5 = SDLK_WORLD_5,
    $K_WORLD_6 = SDLK_WORLD_6,
    $K_WORLD_7 = SDLK_WORLD_7,
    $K_WORLD_8 = SDLK_WORLD_8,
    $K_WORLD_9 = SDLK_WORLD_9,
    $K_WORLD_10 = SDLK_WORLD_10,
    $K_WORLD_11 = SDLK_WORLD_11,
    $K_WORLD_12 = SDLK_WORLD_12,
    $K_WORLD_13 = SDLK_WORLD_13,
    $K_WORLD_14 = SDLK_WORLD_14,
    $K_WORLD_15 = SDLK_WORLD_15,
    $K_WORLD_16 = SDLK_WORLD_16,
    $K_WORLD_17 = SDLK_WORLD_17,
    $K_WORLD_18 = SDLK_WORLD_18,
    $K_WORLD_19 = SDLK_WORLD_19,
    $K_WORLD_20 = SDLK_WORLD_20,
    $K_WORLD_21 = SDLK_WORLD_21,
    $K_WORLD_22 = SDLK_WORLD_22,
    $K_WORLD_23 = SDLK_WORLD_23,
    $K_WORLD_24 = SDLK_WORLD_24,
    $K_WORLD_25 = SDLK_WORLD_25,
    $K_WORLD_26 = SDLK_WORLD_26,
    $K_WORLD_27 = SDLK_WORLD_27,
    $K_WORLD_28 = SDLK_WORLD_28,
    $K_WORLD_29 = SDLK_WORLD_29,
    $K_WORLD_30 = SDLK_WORLD_30,
    $K_WORLD_31 = SDLK_WORLD_31,
    $K_WORLD_32 = SDLK_WORLD_32,
    $K_WORLD_33 = SDLK_WORLD_33,
    $K_WORLD_34 = SDLK_WORLD_34,
    $K_WORLD_35 = SDLK_WORLD_35,
    $K_WORLD_36 = SDLK_WORLD_36,
    $K_WORLD_37 = SDLK_WORLD_37,
    $K_WORLD_38 = SDLK_WORLD_38,
    $K_WORLD_39 = SDLK_WORLD_39,
    $K_WORLD_40 = SDLK_WORLD_40,
    $K_WORLD_41 = SDLK_WORLD_41,
    $K_WORLD_42 = SDLK_WORLD_42,
    $K_WORLD_43 = SDLK_WORLD_43,
    $K_WORLD_44 = SDLK_WORLD_44,
    $K_WORLD_45 = SDLK_WORLD_45,
    $K_WORLD_46 = SDLK_WORLD_46,
    $K_WORLD_47 = SDLK_WORLD_47,
    $K_WORLD_48 = SDLK_WORLD_48,
    $K_WORLD_49 = SDLK_WORLD_49,
    $K_WORLD_50 = SDLK_WORLD_50,
    $K_WORLD_51 = SDLK_WORLD_51,
    $K_WORLD_52 = SDLK_WORLD_52,
    $K_WORLD_53 = SDLK_WORLD_53,
    $K_WORLD_54 = SDLK_WORLD_54,
    $K_WORLD_55 = SDLK_WORLD_55,
    $K_WORLD_56 = SDLK_WORLD_56,
    $K_WORLD_57 = SDLK_WORLD_57,
    $K_WORLD_58 = SDLK_WORLD_58,
    $K_WORLD_59 = SDLK_WORLD_59,
    $K_WORLD_60 = SDLK_WORLD_60,
    $K_WORLD_61 = SDLK_WORLD_61,
    $K_WORLD_62 = SDLK_WORLD_62,
    $K_WORLD_63 = SDLK_WORLD_63,
    $K_WORLD_64 = SDLK_WORLD_64,
    $K_WORLD_65 = SDLK_WORLD_65,
    $K_WORLD_66 = SDLK_WORLD_66,
    $K_WORLD_67 = SDLK_WORLD_67,
    $K_WORLD_68 = SDLK_WORLD_68,
    $K_WORLD_69 = SDLK_WORLD_69,
    $K_WORLD_70 = SDLK_WORLD_70,
    $K_WORLD_71 = SDLK_WORLD_71,
    $K_WORLD_72 = SDLK_WORLD_72,
    $K_WORLD_73 = SDLK_WORLD_73,
    $K_WORLD_74 = SDLK_WORLD_74,
    $K_WORLD_75 = SDLK_WORLD_75,
    $K_WORLD_76 = SDLK_WORLD_76,
    $K_WORLD_77 = SDLK_WORLD_77,
    $K_WORLD_78 = SDLK_WORLD_78,
    $K_WORLD_79 = SDLK_WORLD_79,
    $K_WORLD_80 = SDLK_WORLD_80,
    $K_WORLD_81 = SDLK_WORLD_81,
    $K_WORLD_82 = SDLK_WORLD_82,
    $K_WORLD_83 = SDLK_WORLD_83,
    $K_WORLD_84 = SDLK_WORLD_84,
    $K_WORLD_85 = SDLK_WORLD_85,
    $K_WORLD_86 = SDLK_WORLD_86,
    $K_WORLD_87 = SDLK_WORLD_87,
    $K_WORLD_88 = SDLK_WORLD_88,
    $K_WORLD_89 = SDLK_WORLD_89,
    $K_WORLD_90 = SDLK_WORLD_90,
    $K_WORLD_91 = SDLK_WORLD_91,
    $K_WORLD_92 = SDLK_WORLD_92,
    $K_WORLD_93 = SDLK_WORLD_93,
    $K_WORLD_94 = SDLK_WORLD_94,
    $K_WORLD_95 = SDLK_WORLD_95,
    $K_KP0 = SDLK_KP0,
    $K_KP1 = SDLK_KP1,
    $K_KP2 = SDLK_KP2,
    $K_KP3 = SDLK_KP3,
    $K_KP4 = SDLK_KP4,
    $K_KP5 = SDLK_KP5,
    $K_KP6 = SDLK_KP6,
    $K_KP7 = SDLK_KP7,
    $K_KP8 = SDLK_KP8,
    $K_KP9 = SDLK_KP9,
    $K_KP_PERIOD = SDLK_KP_PERIOD,
    $K_KP_DIVIDE = SDLK_KP_DIVIDE,
    $K_KP_MULTIPLY = SDLK_KP_MULTIPLY,
    $K_KP_MINUS = SDLK_KP_MINUS,
    $K_KP_PLUS = SDLK_KP_PLUS,
    $K_KP_ENTER = SDLK_KP_ENTER,
    $K_KP_EQUALS = SDLK_KP_EQUALS,
    $K_UP = SDLK_UP,
    $K_DOWN = SDLK_DOWN,
    $K_RIGHT = SDLK_RIGHT,
    $K_LEFT = SDLK_LEFT,
    $K_INSERT = SDLK_INSERT,
    $K_HOME = SDLK_HOME,
    $K_END = SDLK_END,
    $K_PAGEUP = SDLK_PAGEUP,
    $K_PAGEDOWN = SDLK_PAGEDOWN,
    $K_F1 = SDLK_F1,
    $K_F2 = SDLK_F2,
    $K_F3 = SDLK_F3,
    $K_F4 = SDLK_F4,
    $K_F5 = SDLK_F5,
    $K_F6 = SDLK_F6,
    $K_F7 = SDLK_F7,
    $K_F8 = SDLK_F8,
    $K_F9 = SDLK_F9,
    $K_F10 = SDLK_F10,
    $K_F11 = SDLK_F11,
    $K_F12 = SDLK_F12,
    $K_F13 = SDLK_F13,
    $K_F14 = SDLK_F14,
    $K_F15 = SDLK_F15,
    $K_NUMLOCK = SDLK_NUMLOCK,
    $K_CAPSLOCK = SDLK_CAPSLOCK,
    $K_SCROLLOCK = SDLK_SCROLLOCK,
    $K_RSHIFT = SDLK_RSHIFT,
    $K_LSHIFT = SDLK_LSHIFT,
    $K_RCTRL = SDLK_RCTRL,
    $K_LCTRL = SDLK_LCTRL,
    $K_RALT = SDLK_RALT,
    $K_LALT = SDLK_LALT,
    $K_RMETA = SDLK_RMETA,
    $K_LMETA = SDLK_LMETA,
    $K_LSUPER = SDLK_LSUPER,
    $K_RSUPER = SDLK_RSUPER,
    $K_MODE = SDLK_MODE,
    $K_COMPOSE = SDLK_COMPOSE,
    $K_HELP = SDLK_HELP,
    $K_PRINT = SDLK_PRINT,
    $K_SYSREQ = SDLK_SYSREQ,
    $K_BREAK = SDLK_BREAK,
    $K_MENU = SDLK_MENU,
    $K_POWER = SDLK_POWER,
    $K_EURO = SDLK_EURO,
    $K_UNDO = SDLK_UNDO,

// key mods

    $KMOD_NONE = KMOD_NONE,
    $KMOD_LSHIFT = KMOD_LSHIFT,
    $KMOD_RSHIFT = KMOD_RSHIFT,
    $KMOD_LCTRL = KMOD_LCTRL,
    $KMOD_RCTRL = KMOD_RCTRL,
    $KMOD_LALT = KMOD_LALT,
    $KMOD_RALT = KMOD_RALT,
    $KMOD_LMETA = KMOD_LMETA,
    $KMOD_RMETA = KMOD_RMETA,
    $KMOD_NUM = KMOD_NUM,
    $KMOD_CAPS = KMOD_CAPS,
    $KMOD_MODE = KMOD_MODE,
    $KMOD_RESERVED = KMOD_RESERVED,


};

